<!-- 评级统计 -->
<template>
  <div class="table w1021 infoprofit_orgRating">
    <div class="tableTh tableTr flex">
      <span class="tableTd w130 table_hight_center">统计时段</span>
      <span class="tableTd w350 flex wrap">
        <span class="tableTdd bottom w350">投资评级（万股）</span>
        <span class="tableTdd w175">综合评级分值</span>
        <span class="tableTdd w175 left">综合评级</span>
      </span>
      <span class="tableTd w542 flex wrap">
        <span class="tableTdd bottom w542">评级分布</span>
        <span class="tableTdd w90">买入家数</span>
        <span class="tableTdd w90 left">增持家数</span>
        <span class="tableTdd w90 left">中性家数</span>
        <span class="tableTdd w90 left">减持家数</span>
        <span class="tableTdd w90 left">卖出家数</span>
        <span class="tableTdd w90 left">总家数</span>
      </span>
    </div>
    <div class="tableTr tableBody top flex" v-for="(item,index) in data" :key="index">
      <span class="tableTd w130 orange">{{item.statDate}}</span>
      <span class="tableTd w350 flex wrap">
        <span class="tableTdd w350"></span>
        <span class="tableTdd w175 orange">{{item.ratingScore|filterVal}}</span>
        <span class="tableTdd w175 orange left">{{item.ratingSyn}}</span>
      </span>
      <span class="tableTd w542 flex wrap">
        <span class="tableTdd w542"></span>
        <span class="tableTdd w90 orange">{{item.buyNum}}</span>
        <span class="tableTdd w90 orange left">{{item.addNum}}</span>
        <span class="tableTdd w90 orange left">{{item.minNum}}</span>
        <span class="tableTdd w90 orange left">{{item.minusNum}}</span>
        <span class="tableTdd w90 orange left">{{item.sellNum}}</span>
        <span class="tableTdd w90 orange left">{{item.orgNum}}</span>
      </span>
    </div>
    <div class="tableNone orange w1021 top" v-if="data.length==0">暂无数据</div>
  </div>
</template>

<script>
import { number } from "../../script/api";
export default {
  data() {
    return {};
  },
  props: ["data"],
  filters: {
    filterVal(ops, num) {
      if (typeof ops == "number") {
        return number(ops, num);
      }
      return ops ? ops : "--";
    }
  },
  components: {},
  computed: {},
  mounted() {},
  methods: {}
};
</script>
<style lang='scss' scoped>
</style>